package com.hongbao.utils;

import java.math.BigDecimal;

/**
 * 作者: LCG
 * 日期: 2020/1/31 19:11
 * 描述:
 */
public class MyTest {
    public static void main(String[] args) {

        RedPackage2 redPackage2=new RedPackage2();
        redPackage2.setMoney(new BigDecimal(1000));
        redPackage2.setCount(25);

        int cou=0;

        while (true){

            BigDecimal oneRedBag = HongBaoUtils.getOneRedBag(redPackage2);

            cou=cou+oneRedBag.intValue();
            if(redPackage2.getCount()<=0){
                System.out.println("===================="+cou);
                break;
            }


            System.out.println(oneRedBag.intValue());
        }


    }
}
